<!DOCTYPE html>
<html lang="en">

<head>
	<meta charset="utf-8" />
	<link rel="stylesheet" type="text/css" href="../test/css/test.css">

	<script type="text/javascript" src="../../lib/jstree/jquery.jstree.js"></script>
	<script type="text/javascript" src="../test/js/testmgtservice.js"></script>
	<script type="text/javascript" src="../test/js/testmgtcontroller.js"></script>
	<script type="text/javascript" src="../test/js/testrepository.js"></script>



	<script id="categories-list-tmpl" type="text/x-handlebars-template">
		<ul>
			{{#each childCategories}}
			<li data-type="CATEGORY" data-name="{{name}}">
				<a href="#">{{name}}</a>
			{{>categories-recursion}}
			</li>
			{{/each}}
			</ul>
	</script>


	<script id="tests-overview-list-tmpl" type="text/x-handlebars-template">
		<div class="tests row">
		{{#each tests}}
						<div class ="thumbnail test col-md-3">
								<div class="row">
									<div class="col-md-4 col-sm-4">
										<img class="img-galery" alt="" src="{{img}}" style="width:65px;height:65px">
									</div>
									<div class="col-md-8 col-sm-8">
										<h5>Name : {{name}}</h5>
										<p class="description" style="height:20px">
											{{desc}}
										</p>
									
									</div>
								</div>
								
								
								<div class="caption" style="padding:0px">
									<p class="author">
										<h5>Author : {{createdBy}}</h5>
									</p>
									
									<div class="test-rating" data-rating="{{rating}}">
									</div>
									
									<div class="categories" style="padding:5px">
										<h5>Categories</h5>
										<ul style="list-style-type:none">
											<li style="margin-bottom:5px">
												<span class="label label-primary">IAS</span>
											</li>
											<li style="margin-bottom:5px">
												<span class="label label-primary">IAS->Public Administration</span>
											</li>
										</ul>
									</div>
	
									<div class="controls">
										<button id ="view-test-{{code}}" class="btn-success btn view-test" style="margin-top:5px">
											View
										</button>
										<button id ="subscribe-test-{{code}}" class="btn-warning btn" style="margin-top:5px">
											Subscribe
										</button>
									</div>
									
								</div>
						</div>	
					
					{{/each}}
		</div>
	</script>



	<script id="categories-recursion-partial" type="text/x-handlebars-template">
		{{#if childCategories}}
			<ul>
			{{#each childCategories}}
			<li data-type ="CATEGORY" data-name="{{name}}" >
				<a href="#">{{name}}</a>
			{{>categories-recursion}}
			</li>
			{{/each}}
			</ul>
			{{/if}}
	</script>

	<script>
		$(document).ready(function() {
				TestMgtController.getAllTests();
			});
	</script>

</head>

<body>

	<div class="container" id="content">
		<div class="row">
			<div class="col-md-12 content-holder all_tests" id="ms-container"></div>
		</div>
	</div>

</body>

</html>
